﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MySite.Model.VoteInfo>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	投票列表
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>
        投票列表</h2> <%: Html.ActionLink("新增", "VoteAdd")%>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="listable">
        <tr class="listheader">
            <td>
            </td>
            <td>
                编号
            </td>
            <td>
                投票主题
            </td>
            <td>
                创建时间
            </td>
            <td>
                开始时间
            </td>
            <td>
                结束时间
            </td>
            <td>
                是否结束
            </td>
        </tr>
    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("编辑", "VoteEdit", new { pid=item.PID})%> |
                <%= Html.ActionLink("删除", "VoteDelete", new { pid = item.PID })%>
            </td>
            <td>
                <%: item.PID %>
            </td>
            <td>
                <%: item.Title %>
            </td>
            <td>
                <%: item.CreateTime %>
            </td>
            <td>
                <%: item.BeginDate %>
            </td>
            <td>
                <%: item.EndDate %>
            </td>
            <td>
                <%: item.IsOver %>
            </td>
        </tr>
    
    <% } %>

    </table>
    <div class="bj-sp10">
    </div>
    <div class="f-blue-1218 bj-right">
        <%= Html.ActionLink("首页", "VoteList", new { id = 1 })%>
        <%= Html.ActionLink("上一页", "VoteList", new { id = (Convert.ToInt32(ViewData["page"]) - 1) < 1 ? 1 : (Convert.ToInt32(ViewData["page"]) - 1) })%>
        <%= Html.ActionLink("下一页", "VoteList", new { id = (Convert.ToInt32(ViewData["page"]) + 1) > Convert.ToInt32(ViewData["pageCount"]) ? Convert.ToInt32(ViewData["pageCount"]) : (Convert.ToInt32(ViewData["page"]) + 1) })%>
        <%= Html.ActionLink("尾页", "VoteList", new { id = Convert.ToInt32(ViewData["pageCount"]) })%>
    </div>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>

